FROM registry.cn-shenzhen.aliyuncs.com/tpshion/graalvm-jdk:17

ENV LANG C.UTF-8
ENV TZ Asia/Shanghai
ENV database /home/workspace/vm-devops.db
ENV maven /home/repo

RUN mkdir /home/workspace
RUN mkdir /home/repo

WORKDIR /home/workspace

VOLUME /tmp
ADD vm-devops-server/vm-service/target/vm-service-*.jar /home/workspace/app.jar
ADD database/vm-devops.db /home/workspace/vm-devops.db
EXPOSE 9595
ENTRYPOINT ["sh", "-c", "java -server -Xms512m -Xmx1024m -jar /home/workspace/app.jar"]